/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package org.hl7.v3;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import org.eclipse.emf.common.util.Enumerator;

/**
 * <!-- begin-user-doc -->
 * A representation of the literals of the enumeration '<em><b>Act Invoice Payment Code</b></em>',
 * and utility methods for working with them.
 * <!-- end-user-doc -->
 * <!-- begin-model-doc -->
 * abstDomain: A19673 (C-0-T13953-A19673-cpt)
 * <!-- end-model-doc -->
 * @see org.hl7.v3.V3Package#getActInvoicePaymentCode()
 * @model extendedMetaData="name='ActInvoicePaymentCode'"
 * @generated
 */
public enum ActInvoicePaymentCode implements Enumerator {
	/**
	 * The '<em><b>BONUS</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #BONUS_VALUE
	 * @generated
	 * @ordered
	 */
	BONUS(0, "BONUS", "BONUS"),

	/**
	 * The '<em><b>CFWD</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #CFWD_VALUE
	 * @generated
	 * @ordered
	 */
	CFWD(1, "CFWD", "CFWD"),

	/**
	 * The '<em><b>EPYMT</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #EPYMT_VALUE
	 * @generated
	 * @ordered
	 */
	EPYMT(2, "EPYMT", "EPYMT"),

	/**
	 * The '<em><b>EDU</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #EDU_VALUE
	 * @generated
	 * @ordered
	 */
	EDU(3, "EDU", "EDU"),

	/**
	 * The '<em><b>GARN</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #GARN_VALUE
	 * @generated
	 * @ordered
	 */
	GARN(4, "GARN", "GARN"),

	/**
	 * The '<em><b>PINV</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #PINV_VALUE
	 * @generated
	 * @ordered
	 */
	PINV(5, "PINV", "PINV"),

	/**
	 * The '<em><b>PPRD</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #PPRD_VALUE
	 * @generated
	 * @ordered
	 */
	PPRD(6, "PPRD", "PPRD"),

	/**
	 * The '<em><b>PROA</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #PROA_VALUE
	 * @generated
	 * @ordered
	 */
	PROA(7, "PROA", "PROA"),

	/**
	 * The '<em><b>RECOV</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #RECOV_VALUE
	 * @generated
	 * @ordered
	 */
	RECOV(8, "RECOV", "RECOV"),

	/**
	 * The '<em><b>RETRO</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #RETRO_VALUE
	 * @generated
	 * @ordered
	 */
	RETRO(9, "RETRO", "RETRO"),

	/**
	 * The '<em><b>INVOICE</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #INVOICE_VALUE
	 * @generated
	 * @ordered
	 */
	INVOICE(10, "INVOICE", "INVOICE"),

	/**
	 * The '<em><b>TRAN</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #TRAN_VALUE
	 * @generated
	 * @ordered
	 */
	TRAN(11, "TRAN", "TRAN");

	/**
	 * The '<em><b>BONUS</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>BONUS</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #BONUS
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int BONUS_VALUE = 0;

	/**
	 * The '<em><b>CFWD</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>CFWD</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #CFWD
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int CFWD_VALUE = 1;

	/**
	 * The '<em><b>EPYMT</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>EPYMT</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #EPYMT
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int EPYMT_VALUE = 2;

	/**
	 * The '<em><b>EDU</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>EDU</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #EDU
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int EDU_VALUE = 3;

	/**
	 * The '<em><b>GARN</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>GARN</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #GARN
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int GARN_VALUE = 4;

	/**
	 * The '<em><b>PINV</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>PINV</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #PINV
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int PINV_VALUE = 5;

	/**
	 * The '<em><b>PPRD</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>PPRD</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #PPRD
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int PPRD_VALUE = 6;

	/**
	 * The '<em><b>PROA</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>PROA</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #PROA
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int PROA_VALUE = 7;

	/**
	 * The '<em><b>RECOV</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>RECOV</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #RECOV
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int RECOV_VALUE = 8;

	/**
	 * The '<em><b>RETRO</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>RETRO</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #RETRO
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int RETRO_VALUE = 9;

	/**
	 * The '<em><b>INVOICE</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>INVOICE</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #INVOICE
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int INVOICE_VALUE = 10;

	/**
	 * The '<em><b>TRAN</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>TRAN</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #TRAN
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int TRAN_VALUE = 11;

	/**
	 * An array of all the '<em><b>Act Invoice Payment Code</b></em>' enumerators.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private static final ActInvoicePaymentCode[] VALUES_ARRAY =
		new ActInvoicePaymentCode[] {
			BONUS,
			CFWD,
			EPYMT,
			EDU,
			GARN,
			PINV,
			PPRD,
			PROA,
			RECOV,
			RETRO,
			INVOICE,
			TRAN,
		};

	/**
	 * A public read-only list of all the '<em><b>Act Invoice Payment Code</b></em>' enumerators.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static final List<ActInvoicePaymentCode> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));

	/**
	 * Returns the '<em><b>Act Invoice Payment Code</b></em>' literal with the specified literal value.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static ActInvoicePaymentCode get(String literal) {
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
			ActInvoicePaymentCode result = VALUES_ARRAY[i];
			if (result.toString().equals(literal)) {
				return result;
			}
		}
		return null;
	}

	/**
	 * Returns the '<em><b>Act Invoice Payment Code</b></em>' literal with the specified name.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static ActInvoicePaymentCode getByName(String name) {
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
			ActInvoicePaymentCode result = VALUES_ARRAY[i];
			if (result.getName().equals(name)) {
				return result;
			}
		}
		return null;
	}

	/**
	 * Returns the '<em><b>Act Invoice Payment Code</b></em>' literal with the specified integer value.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static ActInvoicePaymentCode get(int value) {
		switch (value) {
			case BONUS_VALUE: return BONUS;
			case CFWD_VALUE: return CFWD;
			case EPYMT_VALUE: return EPYMT;
			case EDU_VALUE: return EDU;
			case GARN_VALUE: return GARN;
			case PINV_VALUE: return PINV;
			case PPRD_VALUE: return PPRD;
			case PROA_VALUE: return PROA;
			case RECOV_VALUE: return RECOV;
			case RETRO_VALUE: return RETRO;
			case INVOICE_VALUE: return INVOICE;
			case TRAN_VALUE: return TRAN;
		}
		return null;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final int value;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final String name;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final String literal;

	/**
	 * Only this class can construct instances.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private ActInvoicePaymentCode(int value, String name, String literal) {
		this.value = value;
		this.name = name;
		this.literal = literal;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getValue() {
	  return value;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getName() {
	  return name;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getLiteral() {
	  return literal;
	}

	/**
	 * Returns the literal value of the enumerator, which is its string representation.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		return literal;
	}
	
} //ActInvoicePaymentCode
